package com.ztn.sdk.iot.hook.bean.protocol;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

/**
 * @author zhm
 * 联动上传未完成
 */


@JsonInclude(JsonInclude.Include.NON_NULL)
public class DeviceUploadUniJsonProtocol extends BaseProtocol {

    private String version;

    private String msgId;

    private String error;

    private String msg;

    private Boolean needResponse;

    private Double lat;

    private Double lng;

    private Boolean charging;

    private String direction;

    private Double speed;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getNeedResponse() {
        return needResponse;
    }

    public void setNeedResponse(Boolean needResponse) {
        this.needResponse = needResponse;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Boolean getCharging() {
        return charging;
    }

    public void setCharging(Boolean charging) {
        this.charging = charging;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public Double getSpeed() {
        return speed;
    }

    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    public DeviceLocal getLocal() {
        return local;
    }

    public void setLocal(DeviceLocal local) {
        this.local = local;
    }

    public DeviceSetting getSetting() {
        return setting;
    }

    public void setSetting(DeviceSetting setting) {
        this.setting = setting;
    }

    public List<SensorBean> getSensorList() {
        return sensorList;
    }

    public void setSensorList(List<SensorBean> sensorList) {
        this.sensorList = sensorList;
    }


    public static class DeviceLocal {
        private String mcc;
        private String mnc;
        private String lac;
        private String ci;
        private String bsic;

        public String getMcc() {
            return mcc;
        }

        public void setMcc(String mcc) {
            this.mcc = mcc;
        }

        public String getMnc() {
            return mnc;
        }

        public void setMnc(String mnc) {
            this.mnc = mnc;
        }

        public String getLac() {
            return lac;
        }

        public void setLac(String lac) {
            this.lac = lac;
        }

        public String getCi() {
            return ci;
        }

        public void setCi(String ci) {
            this.ci = ci;
        }

        public String getBsic() {
            return bsic;
        }

        public void setBsic(String bsic) {
            this.bsic = bsic;
        }
    }


    private DeviceLocal local;

    /**
     * 服务器下发命令//设备回应服务器命令
     */


    public static class DeviceSetting {

        private String keyName;

        private String port;

        private Object value;

        public String getKeyName() {
            return keyName;
        }

        public void setKeyName(String keyName) {
            this.keyName = keyName;
        }

        public String getPort() {
            return port;
        }

        public void setPort(String port) {
            this.port = port;
        }

        public Object getValue() {
            return value;
        }

        public void setValue(Object value) {
            this.value = value;
        }
    }

    private DeviceSetting setting;

    private List<SensorBean> sensorList;


    public static class SensorBean {
        /**
         * time : 1531885293739
         * value : 1
         */

        private String port;

        private Integer sensorId;

        private String status;

        private List<SensorParam> paramList;

        private List<SensorExplain> explainList;

        private List<SensorSetting> settingList;

        public String getPort() {
            return port;
        }

        public void setPort(String port) {
            this.port = port;
        }

        public Integer getSensorId() {
            return sensorId;
        }

        public void setSensorId(Integer sensorId) {
            this.sensorId = sensorId;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public List<SensorParam> getParamList() {
            return paramList;
        }

        public void setParamList(List<SensorParam> paramList) {
            this.paramList = paramList;
        }

        public List<SensorExplain> getExplainList() {
            return explainList;
        }

        public void setExplainList(List<SensorExplain> explainList) {
            this.explainList = explainList;
        }

        public List<SensorSetting> getSettingList() {
            return settingList;
        }

        public void setSettingList(List<SensorSetting> settingList) {
            this.settingList = settingList;
        }

    }


    public static class SensorSetting {

        private String keyName;

        private Object value;

        private Integer status;

        public String getKeyName() {
            return keyName;
        }

        public void setKeyName(String keyName) {
            this.keyName = keyName;
        }

        public Object getValue() {
            return value;
        }

        public void setValue(Object value) {
            this.value = value;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }
    }

    public static class SensorExplain {

        private String keyName;

        private String rawValue;

        private Object value;

        private String type;

        public String getKeyName() {
            return keyName;
        }

        public void setKeyName(String keyName) {
            this.keyName = keyName;
        }

        public String getRawValue() {
            return rawValue;
        }

        public void setRawValue(String rawValue) {
            this.rawValue = rawValue;
        }

        public Object getValue() {
            return value;
        }

        public void setValue(Object value) {
            this.value = value;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
    }


    public static class SensorParam {

        private String keyName;

        private Object value;

        public String getKeyName() {
            return keyName;
        }

        public void setKeyName(String keyName) {
            this.keyName = keyName;
        }

        public Object getValue() {
            return value;
        }

        public void setValue(Object value) {
            this.value = value;
        }
    }

}
